/*
 * <p>Copyright® 2009-2022 东软 IT 实训中心版权所有。</p>
 */

package com.max.back.doctor.api;

import com.max.back.common.http.ResponseResult;
import com.max.back.doctor.service.PatientService;
import com.max.back.entity.Patient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotBlank;
import java.util.Map;

/**
* @description 
* 
* <p>
* <code>PatientApi</code>
*
* </p>
* @see 
* @author 辛凤文 forward.seen@foxmail.com
* @version 1.0 
* @time 2022/7/24 23:49 
*/
@RestController
@CrossOrigin
@RequestMapping("/patient")
@Validated
public class PatientApi {

    @Autowired
    private PatientService service;

    @GetMapping("/getPatientInfo")
    public ResponseResult<Map<String, Object>> getPatientInfo(@NotBlank String patientHistoryId){
        Map<String, Object> patientInfo = service.getPatientInfoByPatientHistoryId(patientHistoryId);
        return ResponseResult.getSuccessResult(patientInfo);
    }
}